package com.situ.mall.admin.task;

import com.situ.mall.common.service.IAttachmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;

//@Component
public class CleanTask {

    @Autowired
    private IAttachmentService attachmentService;

    //cron表达式　　定制一个调度规则
    @Scheduled(cron = "0 0/1 * * * ?")
    public void cleanAttachment(){
        attachmentService.clean();
    }

}
